<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DOM事件</title>
</head>
<body>
<h1>onmouseover 和 onmouseout 事件</h1>
<div onmouseover="mOver(this)"
     onmouseout="mOut(this)"
     style="background-color: #D94A38;
width: 120px; height: 20px;padding: 40px"
>
  鼠标移至此
</div>
<script>
  function mOver(obj){
    obj.innerHTML = "谢谢您"
  }
  function mOut(obj){
    obj.innerHTML = "鼠标移至此"
  }
</script>

</body>
</html>